#!/bin/bash

set -x
set -e
#!/bin/bash
cd ~/openharmony/third_party/musl
rm -rf *
git restore ./
cp musl_config.gni musl_config.gni.bak
patch -p1 < ~/tmp.patch
#echo "declare_args() { non_current_interface = true }" >> musl_config.gni
git clone https://gitee.com/ychuawei/MuslBenchmark.git
cd ~/openharmony
./build/prebuilts_download.sh
./build.sh --product-name rk3568 --build-target benchmark-musl --build-target benchmark-bionic
cd ~/openharmony/out/rk3568/thirdparty
tar -zcvf benchmark.tar.gz musl/
set +x